{% extends 'base.html' %}
{% load static app_extras%}
{% block title %}服务器资源申请详情{% endblock title %}

{% block extra_style %}
  <link rel="stylesheet" type="text/css" href="{% static 'css/detail.css' %}">
{% endblock extra_style %}

{% block content %}
  <h2>申请信息</h2>
  <table class="table table-striped table-bordered">
    <thead>
      <tr>
        <td>序号</td>
        <td>员工编号</td>
        <td>姓名</td>
        <td>项目名</td>
        <td>申请数量</td>
        <td>大致预算</td>
        <td>申请时间</td>
        <td>详细附件</td>
        <td>备注</td>
        <td>审批进度</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>{{ application.id }}</td>
        <td>{{ application.user_id }}</td>
        <td>{{ application.user_name }}</td>
        <td>{{ application.project_name }}</td>
        <td>{{ application.server_count }}</td>
        <td>{{ application.budget }}</td>
        <td>{{ application.pub_date|date:"Y-m-d H:i" }}</td>
        <td><a href="/uploads/{{ application.detail_file.name }}" title="{{ application.detail_file.name|basename }}">下载</a></td>
        <td><pre>{{ application.remark }}</pre></td>
        <td>
          <span>{{ application.approval__text }}</span>
        </td>
      </tr>
    </tbody>
  </table>
{% endblock content %}
{% block extra_script %}
  <script src="{% static 'js/detail.js' %}"></script>
  <script>
    {% if message %}
      alert('{{ message }}');
    {% endif %}
  </script>
{% endblock extra_script %}
